package com.example.gateway.config;

import com.example.gateway.filter.AuthFilter;
import com.example.gateway.filter.RequestLoggingFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Zuul网关配置类
 * 配置网关过滤器和路由规则
 * 
 * @author SimpleShop
 * @version 1.0
 */
@Configuration
public class ZuulConfig {

    /**
     * 注册认证过滤器
     */
    @Bean
    public AuthFilter authFilter() {
        return new AuthFilter();
    }

    /**
     * 注册请求日志过滤器
     */
    @Bean
    public RequestLoggingFilter requestLoggingFilter() {
        return new RequestLoggingFilter();
    }
}